package com.redijedi.tapestry5.test;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;

/**
 * General purpose class for testing components.
 * 
 * @author torr
 * 
 */
public class Thing {

	private String id = UUID.randomUUID().toString();

	private Date label = new Date();

	private List<Thing> children = new ArrayList<Thing>();

	public Thing() {

	}

	/**
	 * @param id
	 */
	public Thing(String id) {
		super();
		this.id = id;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the label
	 */
	public Date getLabel() {
		return label;
	}

	/**
	 * @param label
	 *            the label to set
	 */
	public void setLabel(Date label) {
		this.label = label;
	}

	/**
	 * @return the children
	 */
	public List<Thing> getChildren() {
		return children;
	}

	/**
	 * @param children
	 *            the children to set
	 */
	public void setChildren(List<Thing> children) {
		this.children = children;
	}

	/**
	 * @param child
	 *            the child to set
	 */
	public Thing addChild(Thing child) {
		this.children.add(child);
		return this;
	}

}
